package com.iring.domain.common.view;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 查询订单信息的视图
 *
 * @author wanggan
 */
@Entity
@Table(name = "uv_order_info")
public class OrderView implements Serializable{

    private static final long serialVersionUID = 7072557694063218645L;
    @Id
    @GeneratedValue
    @Column(name = "id")
    private Integer id;

    @Column(name = "username")
    private String username;

    @Column(name = "order_id")
    private String orderId;

    @Column(name = "operation_amount",precision = 10,scale = 2)
    private Double optAmounts;

    @Column(name = "real_charge_amount",precision = 10,scale = 2)
    private Double realchargeAmouts;

    @Column(name = "order_type")
    private String orderType;

    @Column(name = "order_status")
    private String orderStatus;

    @Column(name = "order_create_time")
    @Temporal(TemporalType.TIMESTAMP)
    private Date orderCreateTime;

    @Override
    public String toString() {
        return "{id:" + id + ",username:" + username + ",orderId:" + orderId
                + ",optAmounts:" + optAmounts + ",realchargeAmouts:" + realchargeAmouts
                + ",orderType:" + orderType + ",orderStatus:" + orderStatus
                + ",orderCreateTime:" + orderCreateTime + "}";
    }

    public Integer getId() {
        return id;
    }

    public String getUsername() {
        return username;
    }

    public String getOrderId() {
        return orderId;
    }

    public Double getOptAmounts() {
        return optAmounts;
    }

    public Double getRealchargeAmouts() {
        return realchargeAmouts;
    }

    public String getOrderType() {
        return orderType;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public Date getOrderCreateTime() {
        return orderCreateTime;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public void setOptAmounts(Double optAmounts) {
        this.optAmounts = optAmounts;
    }

    public void setRealchargeAmouts(Double realchargeAmouts) {
        this.realchargeAmouts = realchargeAmouts;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public void setOrderCreateTime(Date orderCreateTime) {
        this.orderCreateTime = orderCreateTime;
    }
}
